padding: 0 4px;
}
-.login-dialog-prompt-entry:insensitive {
- color: rgba(0,0,0,0.7);
- border: 2px solid #565656;
- background-gradient-start: rgb(200,200,200);
- background-gradient-end: rgb(210,210,210);
+.modal-dialog StEntry:insensitive {
+ border-color: #666666;
+ color: #9f9f9f;
+ border: 2px solid #9f9f9f;
+ background-gradient-direction: none;
+ background-color: rgba(102, 102, 102, 0.15);
+ box-shadow: inset 0 0 rgba(0,0,0,1.0);
}
/* Panel */
this.close();
},
+ updateSensitivity: function(sensitive) {
+ this._button.reactive = sensitive;
+ this._button.can_focus = sensitive;
+
+ for (let id in this._items)
+ this._items[id].actor.reactive = sensitive;
+ },
+
setActiveSession: function(sessionId) {
if (sessionId == this._activeSessionId)
return;
this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));
+ this._userVerifier.connect('verification-failed', Lang.bind(this, this._verificationFailed));
this._userVerifier.connect('reset', Lang.bind(this, this._reset));
this._userVerifier.connect('show-login-hint', Lang.bind(this, this._showLoginHint));
this._userVerifier.connect('hide-login-hint', Lang.bind(this, this._hideLoginHint));
this._promptLoginHint.hide();
this._promptBox.add(this._promptLoginHint);
+ this._signInButton = null;
+
this._sessionList = new SessionList();
this._sessionList.connect('session-activated',
Lang.bind(this, function(list, sessionId) {
},
_reset: function() {
+ this._updateSensitivity(true);
this._promptMessage.hide();
this._user = null;
this._verifyingUser = false;
this._showUserList();
},
+ _verificationFailed: function() {
+ this._promptEntry.text = '';
+
+ this._updateSensitivity(true);
+ },
+
_onDefaultSessionChanged: function(client, sessionId) {
this._sessionList.setActiveSession(sessionId);
},
function() {
this.setButtons(buttons);
+ this._signInButton = okButtonInfo.button;
- let updateOkButtonEnabled = Lang.bind(this, function() {
- let sensitive = this._promptEntry.text.length > 0;
- okButtonInfo.button.reactive = sensitive;
- okButtonInfo.button.can_focus = sensitive;
- });
-
- updateOkButtonEnabled();
+ this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
- this._promptEntryTextChangedId = this._promptEntry.clutter_text.connect('text-changed', updateOkButtonEnabled);
+ this._promptEntryTextChangedId =
+ this._promptEntry.clutter_text.connect('text-changed',
+ Lang.bind(this, function() {
+ this._updateSignInButtonSensitivity(this._promptEntry.text.length > 0);
+ }));
},
hold];
return batch.run();
},
+ _updateSensitivity: function(sensitive) {
+ this._promptEntry.reactive = sensitive;
+ this._promptEntry.clutter_text.editable = sensitive;
+ this._sessionList.updateSensitivity(sensitive);
+ this._updateSignInButtonSensitivity(sensitive);
+ },
+
+ _updateSignInButtonSensitivity: function(sensitive) {
+ if (this._signInButton) {
+ this._signInButton.reactive = sensitive;
+ this._signInButton.can_focus = sensitive;
+ }
+ },
+
_hidePrompt: function() {
this.setButtons([]);
function() {
this._promptLoginHint.hide();
- this._promptEntry.reactive = true;
+
+ this._updateSensitivity(true);
this._promptEntry.set_text('');
+
+ this._signInButton = null;
}];
let batch = new Batch.ConsecutiveBatch(this, tasks);
},
function() {
- let _text = this._promptEntry.get_text();
- this._promptEntry.reactive = false;
- this._userVerifier.answerQuery(serviceName, _text);
+ let text = this._promptEntry.get_text();
+ this._updateSensitivity(false);
+ this._userVerifier.answerQuery(serviceName, text);
}];
let batch = new Batch.ConsecutiveBatch(this, tasks);
default: true };
this.setButtons([cancelButton, this._okButton]);
- this._updateSensitivity(true);
-
let otherUserLabel = new St.Label({ text: _("Log in as another user"),
style_class: 'login-dialog-not-listed-label' });
this._otherUserButton = new St.Button({ style_class: 'login-dialog-not-listed-button',
{ x_align: St.Align.START,
x_fill: false });
+ this._updateSensitivity(true);
+
let batch = new Batch.Hold();
this._userVerifier.begin(this._userName, batch);
this._promptEntry.reactive = sensitive;
this._promptEntry.clutter_text.editable = sensitive;
this._updateOkButtonSensitivity(sensitive && this._promptEntry.text.length > 0);
+ this._otherUserButton.reactive = sensitive;
+ this._otherUserButton.can_focus = sensitive;
},
_updateOkButtonSensitivity: function(sensitive) {
this._firstQuestion = true;
this._promptEntry.text = '';
- this._promptEntry.clutter_text.set_password_char('\u25cf');
- this._promptEntry.menu.isPassword = true;
this._updateSensitivity(false);
},